package com.tarena.spring.boot.config.condition;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.context.annotation.Configuration;

@Configuration
//指定类 存在 条件才满足 true 满足才加载类
//@ConditionalOnClass(name={"com.tarena.spring.boot.bean.Bean01"})
//指定类 不存在 条件才满足
@ConditionalOnMissingClass(value={"com.tarena.spring.boot.bean.Bean01"})
public class ConditionDemo01Config {
    public ConditionDemo01Config() {
        System.out.println("条件满足,condition-demo01被容器加载");
    }
}
